var TSUI;
(function (TSUI) {
    (function (UI) {
        var CSSNumber = (function () {
            function CSSNumber(Value, Units, Auto) {
                if (typeof Units === "undefined") { Units = "px"; }
                if (typeof Auto === "undefined") { Auto = false; }
                this.Value = Value;
                this.Units = Units;
                this.Auto = Auto;
            }
            CSSNumber.FromString = function (value) {
                if (value === "auto") {
                    return new CSSNumber(0, "", true);
                } else if (value === null || value.trim() === "") {
                    return new CSSNumber(0, "", true);
                } else {
                    var Value = parseInt(value, 10);
                    var Units = value.indexOf("%") > -1 ? "%" : (value.indexOf("em") > -1 ? "em" : "px");
                    return new CSSNumber(Value, Units);
                }
            };

            CSSNumber.prototype.toString = function () {
                return this.ToString();
            };

            CSSNumber.prototype.ToString = function () {
                return this.Auto ? "auto" : this.Value.toString() + this.Units;
            };
            return CSSNumber;
        })();
        UI.CSSNumber = CSSNumber;
    })(TSUI.UI || (TSUI.UI = {}));
    var UI = TSUI.UI;
})(TSUI || (TSUI = {}));
